package com.atguigu.gulimall.search.controller;

/**
 * @author 薛剑
 * @date 2020-11-13 11:31
 */
public class TestThreadVola implements  Runnable {

    MyData myData = new MyData();

    @Override
    public void run() {
        System.out.println("TEst");
        try {
            Thread.sleep(3000);
            SingleTest.getsintest().setN();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        TestThreadVola testThreadVola = new TestThreadVola();
         new Thread(testThreadVola,"TEST").start();
        while (SingleTest.getsintest().n == 0) {
        }
        System.out.println(Thread.currentThread().getName()+"main函数执行");
    }
}
